package com.supreme.threadserver.component;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.stereotype.Component;

@Component
public class ThreadBeanFactory implements BeanFactoryAware {

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        if (beanFactory.containsBean("taskScheduler")) {
            System.out.println("ThreadBeanFactory => taskScheduler");
        }
        if (beanFactory.containsBean("taskExecutor")) {
            System.out.println("ThreadBeanFactory => taskExecutor");
        }
        if (beanFactory.containsBean("nettyWebServer")) {
            System.out.println("ThreadBeanFactory => nettyWebServer");
        }
    }
}
